﻿@using System.Web.Optimization
@using Ed.Entity
@using Ed.Web.Helpers
@model Ed.Entity.TPregnanterMaintenance
@{
    Layout = null;
    //月嫂id
    var pid = (int)ViewBag.Pid;
    //创建人Id,UserLname,UserTname
    var yuesaoCreaterId = (int)ViewBag.SysUser.Id;
    var yuesaoCreaterName = (string)ViewBag.SysUser.UserTname; 
}



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
     <title>雪绒花_育婴师信息维护管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" conte=conte nt="IE=Edge" />
 
    @Styles.Render("~/Themes/default/css/cp.globle.min1.css")
    @Scripts.Render("~/Themes/default/js/cp.globle.min1.js")
    



    <script type="text/javascript">
        //=============================================================
        //去除顶层加载中
        $(document).ready(function () {
            //去除加载中
            if (undefined != top.dialog.list["show_loading"]) {
                top.dialog.list["show_loading"].close().remove();
                //showTopMsg("页面加载成功！", "温馨提示", "Success");
            }
        });
        //=====================================================================
    </script>


    <!--my97DatePicker-->
    <script src="/Themes/default/lib/my97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <!--省市数据-->
    <script src="/Themes/default/base/js/city.js" type="text/javascript"></script>


	
    <script type="text/javascript">
        $(function () {
            validate_form();
        });


            //表单验证
        function validate_form() {
            //表单验证
            $("#pregnantermaintenance_form").validate({
                 invalidHandler: function (e, validator) {
                        var msg = "有 " + validator.numberOfInvalids() + " 项填写有误，请检查！";
                        $("#msgprint").html(msg).show().focus();
                        setTimeout(function () {
                            $("#msgprint").fadeOut(500);
                            //如果动画结束则删除节点
                            if (!$("#msgprint").is(":animated")) {
                                $("#msgprint").hide();
                            }
                        }, 1000);
                    },
                    focusInvalid: false,
                    errorPlacement: function (error, element) {
                        var errorMsg = error[0].innerHTML;
                        var elementName = element[0].name;
                         $("#" + elementName).formtip(errorMsg);
                        $("#" + elementName).attr("placeholder", errorMsg);
                    },
                    success: function (element) {
                        var elem = $(element)[0].htmlFor;
                        $("#" + elem).poshytip('disable');
                        $("#" + elem).poshytip('destroy');
                        $("#" + elem).removeClass("error").addClass("success");
                    }
            });
        }









                //表单验证方法，供父窗口调用
        function form_valid() {
            if ($("#pregnantermaintenance_form").valid()) {
                return true;
            } else {
                return false;
            }

        }

    </script>




</head>
<body>
    <form id="pregnantermaintenance_form" name="pregnantermaintenance_form">
         <!--id-->
          	   <!--月嫂id-->
        @Html.Hidden("PInfoCode",@pid)
		      @Html.HiddenFor(model => model.Id)
         
       
           <!--表单错误提示区-->
        <div tabindex="-1" id="msgprint" class="warning" style="position: fixed; width: 90%; display: none;">您的表单包含错误，请检查！</div>
        <div class="tab-content">
            <ul class="nav nav-tabs" id="formTab">
                <li class="active"><a href="#tab-info" data-toggle="tab">育婴师维护信息管理</a></li>
                 </ul>
            <div class="tab-pane active" id="tab-info">
              <div style="height:15px;"></div>

			   <table width="570" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect">
			    <tbody>
<tr>
@*<th><span class="must">*</span>月嫂编号：</th>
                    <td>
					
			              						 							  @Html.TextBoxFor(model => model.PInfoCode, new { @class = "form-control", @style = "width: 200px; ",@placeholder=""})
							  	
                    </td>*@
               				  			 			     
				   <th><span class="must">*</span>维护类型：</th>
                    <td colspan="3">
<!--				@Html.TextBoxFor(model => model.PMainType, new { @class = "form-control required number", @style = "width:400px; ",@placeholder="请选择，1.信息维护 2.跟踪记录 3.纪念日维护"})-->
				
				    <label class="radio-inline">
					@Html.RadioButtonFor(model => model.PMainType, 1)信息维护
			        </label>
					<label class="radio-inline">
					@Html.RadioButtonFor(model => model.PMainType, 2)跟踪记录
			        </label>
					<label class="radio-inline">
					@Html.RadioButtonFor(model => model.PMainType, 3)纪念日维护
			        </label>
					<label class="radio-inline">
					@Html.RadioButtonFor(model => model.PMainType, 4)其他维护
			        </label>
                    </td>

                </tr>
				<tr>
                	<th><span class="must">*</span>维护内容：</th>
                    <td colspan="3">
			@Html.TextAreaFor(model => model.PMainContent, new { @class = "form-control required", @style = "width:400px; height:70px;",@placeholder="请输入维护内容"})
							  	
                    </td>
               	</tr>
                <tr>  			 			     
				   <th>添加人：</th>
                   <td>
            
                         @Html.DropDownListFor(model => model.PMainCreater, @Html.BuildSelectList(@yuesaoCreaterId.ToString() + "|" + @yuesaoCreaterName, @Html.LoadDefaultValue(Model.PMainCreater.ToString(), @yuesaoCreaterId.ToString()).ToString(), false), new { @class = "form-control", @style = "width:200px;", @disabled = "diabled" })
                       @Html.HiddenFor(model => model.PMainCreater, new { Value = @Session[EdKeys.SESSION_USER_ID], @class = "form-control" }) 	
                
                   </td>
                    <th>添加时间：</th>
                    <td>
                       @Html.TextBoxFor(model => model.PMainCreatTime, new { @class = "form-control isreadonly", Value = @Html.LoadDefaultValue(@Html.DateTimeNullPalse(Model.PMainCreatTime).ToString("yyyy-MM-dd"), DateTime.Now.ToString("yyyy-MM-dd")), @onfocus = "this.blur()" })
                    </td>
                </tr>
              </tbody>
			     </table>
            </div>
        </div>
    </form>
</body>

</html>
